package cn.jasonone.bbs.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.jasonone.bbs.bean.Article;
import cn.jasonone.bbs.mapper.ArticleMapper;
import cn.jasonone.bbs.service.ArticleService;

@Service("articleService")
public class ArticleServiceImpl implements ArticleService {
	@Resource
	private ArticleMapper articleMapper;

	@Override
	public List<Article> findAll(Article t) {
		return articleMapper.findAll(t);
	}

	@Override
	public Article findByID(Long id) {
		return articleMapper.findByID(id);
	}

	@Override
	public boolean insert(Article t) {
		// TODO Auto-generated method stub
		return articleMapper.insert(t) > 0;
	}

	@Override
	public boolean update(Article t) {
		return articleMapper.update(t) > 0;
	}

	@Override
	public boolean delete(Article t) {
		return articleMapper.delete(t) > 0;
	}

}
